@extends('web.master')
@section('head')
    <style>
        .ltem{
            text-align: center;
            margin-bottom: 10px;
        }
        .check {
            height: 30px;
            border: 1px solid #909090;
            border-radius: 5px;
            width: 122px;
            display: inline-block;
        }

        .check span {
            width: 30px;
            height: 30px;
            display: inline-block;
            text-align: center;
            line-height: 30px;
            font-size: 20px;
            float: left;
        }
        .ltem b{
            position:relative;
            top: -10px;
            font-weight: normal;
        }
        .check input {
            width: 60px !important;
            height: 28px !important;
            line-height: 30px !important;
            border-left: 1px solid #909090 !important;
            border-right: 1px solid #909090 !important;
            border-bottom: none !important;
            text-align: center !important;
            float: left;
            border:none
        }
    </style>
    @endsection
@section('title',$combo->title)
    @section('head')
        <link rel="stylesheet" href="{{asset('statics/css/index.css')}}" />
        <script src="/game/js/jquery.min.js"></script>

        <script>
            $.ajaxSetup({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                }
            });

        </script>
        @endsection

@section('body-attr','bgBlue')
@section('content')

    <div class="detail">
        <div class="pic">{{--
            <img src="{{asset('storage/'.$combo->thumb)}}">--}}
            <div class="img" style="	padding-top: 40%;
                    background: url({{asset('storage/'.$combo->thumb)}}) no-repeat center;
                    background-size: cover;"></div>
        </div>
        <h2>{{$combo->title}}</h2>
        <div class="detail_price">
            <div class="orange">
                <b><span>￥</span>{{$combo->activity_price}}<i>¥{{$combo->price}}   {{$combo->times}}次</i></b>
                <input type="hidden" value="1" id="text">
            </div>
        </div>
      {{--  <div class="ltem">
            <b>购买数量：</b>
            <div class="check">
                <span id="sub">-</span>


                <span id="add">+</span>
            </div>
        </div>--}}
        <a href="javascript:void(0)" onclick="callpay()" class="aBtn">立即购买</a>
        <p>
            {!! $combo->content !!}
        </p>


    </div>
    <!--阴影-->
    <div class="shadow">
        <div class="shadow shadow2"></div>
        <div class="shadow shadow3"></div>
    </div>
    @endsection
@section('foot')
    <script>
        var total_num=1;
        $(function(){
            $('#add').click(function(){
                var num = parseInt($("#text").val()) || 0;
                $("#text").val(num + 1);
              total_num=$("#text").val();
            })
            $("#sub").click(function() {
                var num = parseInt($("#text").val()) || 0;
                num = num - 1;
                num = num < 1 ? 1 : num;

                $("#text").val(num);
                total_num=$("#text").val();
            });
        })
    </script>
    @include('web.payment.jspayfor',['type'=>2,'combo_id'=>$combo->id,'combo'=>$combo])
    @endsection